package com.lightsaber.trade.as.entity.reta;


import com.lightsaber.trade.core.entity.BaseEntity;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;

		/**
 * Product.
 */
@Entity
@Table(name="reta_product"
)
public class Product  extends BaseEntity {
	

		
		
    @Version
    @Column(name="version")
		 	private Integer version;
		
		
		
		
		
    
    @Column(name="default_price", precision=12, scale=0)
		 	private Float defaultPrice;
		
    
    @Column(name="name", length=20)
		 	private String name;
		
    
    @Column(name="type", length=20)
		 	private String type;
		
    
    @Column(name="unit", length=20)
		 	private String unit;
		
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="product")
		 	private Set<OrderItem> orderItems = new HashSet<OrderItem>(0);
		
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="product")
		 	private Set<OrderTemplateItem> orderTemplateItems = new HashSet<OrderTemplateItem>(0);
		   
    
    
			
    public Integer getVersion() {
        return this.version;
    }
    
    public void setVersion(Integer version) {
        this.version = version;
    }
    
    
    
    
    
    
			
    public Float getDefaultPrice() {
        return this.defaultPrice;
    }
    
    public void setDefaultPrice(Float defaultPrice) {
        this.defaultPrice = defaultPrice;
    }
    
    
			
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    
			
    public String getType() {
        return this.type;
    }
    
    public void setType(String type) {
        this.type = type;
    }
    
    
			
    public String getUnit() {
        return this.unit;
    }
    
    public void setUnit(String unit) {
        this.unit = unit;
    }
    
    
			
    public Set<OrderItem> getOrderItems() {
        return this.orderItems;
    }
    
    public void setOrderItems(Set<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }
    
    
			
    public Set<OrderTemplateItem> getOrderTemplateItems() {
        return this.orderTemplateItems;
    }
    
    public void setOrderTemplateItems(Set<OrderTemplateItem> orderTemplateItems) {
        this.orderTemplateItems = orderTemplateItems;
    }
    
	}


